<?php
	$var = "  minha string   ";
	echo (strlen($var)."<br/>");         //17
	echo (strlen(ltrim($var))."<br/>");  //15
	echo (strlen(rtrim($var))."<br/>");  //14
	echo (strlen(trim($var))."<br/>");   //12
?>